#include <stdio.h>
#include <stdlib.h>

void unsigned_short2char(char *buf, unsigned short port) {
    buf[0] = port >> 8;
    buf[1] = port;
    return;
}

int test_printf()
{
    int n = 2;
    printf("%02d\n", n);
    return 0;
}

int test_unsigned_short2char() {
    /*
    char *buf = malloc(2);
    unsigned short port = 80;
    unsigned_short2char(buf, port);
    printf("%x %x", buf[0], buf[1]);
    */

    test_printf();
    return 0;
}

int main() {
    test_unsigned_short2char();
    return 0;
}
